//
//  UIImageView+TouchEvent.m
//  Homework
//
//  Created by 李昊林 on 16/7/18.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "UIImageView+TouchEvent.h"

@implementation UIImageView (TouchEvent)
- (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image target:(id)target action:(SEL)aciton
{
    self = [super init];
    if (self) {
        self.frame = frame;
        self.image = image;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:target action:aciton];
        self.userInteractionEnabled = YES;
        [self addGestureRecognizer:tap];
    }
    return self;
}
@end
